package com.crm.service.impl;

import com.crm.entity.CrmClueRemark;
import com.crm.mapper.CrmClueRemarkMapper;
import com.crm.service.ICrmClueRemarkService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.crm.util.ObjectValidate;
import com.crm.vo.ClueRemark;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author junxian,dou
 * @since 2024-11-25
 */
@Service
public class CrmClueRemarkServiceImpl extends ServiceImpl<CrmClueRemarkMapper, CrmClueRemark> implements ICrmClueRemarkService {


    @Override
    public void saveCrmClueRemark(ClueRemark remark) {
        ObjectValidate.ValidateIsEmpty(remark);
        CrmClueRemark crmClueRemark = remark.getCrmClueRemark();
        save(crmClueRemark);
    }

    @Override
    public void deleteCrmClueRemark(String id) {

        removeById(id);

    }

    @Override
    public void updateCrmClueRemark(ClueRemark remark) {
        ObjectValidate.ValidateIsEmpty(remark);
        CrmClueRemark crmClueRemark = remark.getCrmClueRemark();
        updateById(crmClueRemark);
    }
}
